package com.vf.admin.miaodong.controller;

import com.vf.admin.client.service.AppGuardService;
import com.vf.admin.common.BaseController;
import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.entity.AppGuard;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/after/guard")
public class AfterGuardController extends BaseController {

    @Autowired
    private AppGuardService appGuardService;


    /**
     * 守护列表
     * @param splitPageBean
     * @param appGuard
     * @return
     */
    @RequestMapping("/guardList")
    public String guardList(SplitPageBean splitPageBean, AppGuard appGuard)
    {
        List<AppGuard> appGuards = appGuardService.guardList(splitPageBean, appGuard);
        request.setAttribute("list",appGuards);
        request.setAttribute("splitPageBean",splitPageBean);
        request.setAttribute("appGuard",appGuard);
        return this.sucess("/web/after/guard/guardList");
    }

}
